<?php

namespace api\modules\goods\controllers;

use api\extensions\ApiBaseController;
use api\services\goods\GoodsCateService;

class CateController extends ApiBaseController
{
    /**
     * 列表
     * * */
    public function actionList()
    {
        $params = \Yii::$app->request->get();
        $rules = [
            [[], 'default', 'value' => '', 'message' => '名称检索'],
        ];
        $validate = $this->validateParams($params, $rules);
        if ($validate) {
            return $this->jsonError($validate);
        }
        return  GoodsCateService::getList($this->params);
    }

}
